/*
 * Copyright (c) 2014 laidian. All Rights Reserved.
 *
 * @author yaoyuming
 *
 * @date 2019-11-29 17:55
 */
package com.yao.core;

import com.baomidou.mybatisplus.generator.config.po.TableInfo;

import lombok.Builder;
import lombok.Data;

/**
 * swagger 实体类
 *
 * @author yaoyuming
 * @date 2019/11/29 17:55
 */
@Data
@Builder
public class Api {

    /**
     * @api(tags=)
     */
    private String tag;

    /**
     * @ApiOperation(value=)
     */
    private String apiOperationValue;

    public static Api db2Api(TableInfo tableInfo) {
        return Api.builder()
                .tag(tableInfo.getComment())
                .apiOperationValue(tableInfo.getComment())
                .build();

    }
}